import { AppDispatch, RootState } from "@/store";
import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";

// useAppDispatch 本质还是  useDispatch ，只不过加上 类型约束 加上 any，解决 react-redux的bug  后期升级可以解决
export const useAppDispatch: () => AppDispatch | any = useDispatch;
// useAppSelector 本质还是 useSelector ，只不过 加上 类型约束
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
